﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OgilvyOne.BLL;
using OgilvyOne.UKNow.Model;

namespace OgilvyOne.UKNow.BLL
{
    public class NewsTemplateType : CommonModel
    {
        public int LanguageID { get; set; }
        public NewsModel NewsModel { get; set; }
        public NewsTemplateType(NewsModel model)
            : base(model)
        {
            this.NewsModel = model;
        }
        //获取新闻标题
        public string GetNewsTitle()
        {
            string title = this.NewsModel.Title;
            return title + "<input type=hidden id='hdn_newsId' value='" + this.NewsModel.ID + "'/>";
        }
        
        //获取新闻时间
        public string GetNewsDate()
        {
            return  this.NewsModel.UpdatedTime.ToString("yyyy-MM-dd");
        }
        
        //获取新闻内容
        public string GetNewsContent()
        {
            return this.NewsModel.Content;
        }
    }
}
